const moduleB = {
    namespaced: true,
    state: () => ({
        countB: 20
    }),
    getters:{
        doubleCountB(state) {
            return state.countB * 2
        }
    },
    mutations: {
        incrementB(state) {
            state.countB++
        },
    },
    actions: {
        asyncIncrementB({commit}) {
            commit('incrementB')
        },
        emitGlobalMut({commit}) {
            commit("increment",{count: 40},{root: true})
        },
        emitGlobalAct({dispatch}) {
            dispatch("asyncIncrement",{count: 50},{root: true})
        },
    }
}
export default moduleB